package com.seanLab.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * Created by ailly on 17-8-26.
 */
@Document(collection = "#{getImage}")
public class Image implements Serializable, Entity, AbstractImage{
    @Id
    private String imgID;

    private String imgURL;
    private String imgOriginalURL;
    private String imgDescription;
    private String imgSource;
    private List<Category> imgCategory; // 暂时只存叶子类别的id及内容, parentID留空
    private List<TagInfo> imgTagList;
    private String articleID;
    private String articleURL;
    private Integer offset;
    private String contextAbove;
    private String contextBelow;
    private int deprecatedFlag;     // 初始化伪0 表示被标记删除次数
    private int imgType;
    private int esFlag;     // 初始化为0 表示还未同步至es

    private List<Double> imgTopic; //图片主题（基于文章主题）
    private List<Integer> topTopics;

    public Image() {
    }

    public Image(String imgID, String imgURL, String imgOriginalURL, String imgDescription, String imgSource, List<Category> imgCategory, List<TagInfo> imgTagList, String articleID, String articleURL, Integer offset, String contextAbove, String contextBelow, int deprecatedFlag, int imgType, int esFlag) {
        this.imgID = imgID;
        this.imgURL = imgURL;
        this.imgOriginalURL = imgOriginalURL;
        this.imgDescription = imgDescription;
        this.imgSource = imgSource;
        this.imgCategory = imgCategory;
        this.imgTagList = imgTagList;
        this.articleID = articleID;
        this.articleURL = articleURL;
        this.offset = offset;
        this.contextAbove = contextAbove;
        this.contextBelow = contextBelow;
        this.deprecatedFlag = deprecatedFlag;
        this.imgType = imgType;
        this.esFlag = esFlag;
    }

    public String getImgID() {
        return imgID;
    }

    public void setImgID(String imgID) {
        this.imgID = imgID;
    }

    public String getImgURL() {
        return imgURL;
    }

    public void setImgURL(String imgURL) {
        this.imgURL = imgURL;
    }

    public String getImgOriginalURL() {
        return imgOriginalURL;
    }

    public void setImgOriginalURL(String imgOriginalURL) {
        this.imgOriginalURL = imgOriginalURL;
    }

    public String getImgDescription() {
        return imgDescription;
    }

    public void setImgDescription(String imgDescription) {
        this.imgDescription = imgDescription;
    }

    public String getImgSource() {
        return imgSource;
    }

    public void setImgSource(String imgSource) {
        this.imgSource = imgSource;
    }

    public List<Category> getImgCategory() {
        return imgCategory;
    }

    public void setImgCategory(List<Category> imgCategory) {
        this.imgCategory = imgCategory;
    }

    public List<TagInfo> getImgTagList() {
        return imgTagList;
    }

    public void setImgTagList(List<TagInfo> imgTagList) {
        this.imgTagList = imgTagList;
    }

    public String getArticleID() {
        return articleID;
    }

    public void setArticleID(String articleID) {
        this.articleID = articleID;
    }

    public String getArticleURL() {
        return articleURL;
    }

    public void setArticleURL(String articleURL) {
        this.articleURL = articleURL;
    }

    public Integer getOffset() {
        return offset;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public String getContextAbove() {
        return contextAbove;
    }

    public void setContextAbove(String contextAbove) {
        this.contextAbove = contextAbove;
    }

    public String getContextBelow() {
        return contextBelow;
    }

    public void setContextBelow(String contextBelow) {
        this.contextBelow = contextBelow;
    }

    public int getDeprecatedFlag() {
        return deprecatedFlag;
    }

    public void setDeprecatedFlag(int deprecatedFlag) {
        this.deprecatedFlag = deprecatedFlag;
    }

    public int getImgType() {
        return imgType;
    }

    public void setImgType(int imgType) {
        this.imgType = imgType;
    }

    public int getEsFlag() {
        return esFlag;
    }

    public void setEsFlag(int esFlag) {
        this.esFlag = esFlag;
    }

    public List<Double> getImgTopic() {
        return imgTopic;
    }

    public void setImgTopic(List<Double> imgTopic) {
        this.imgTopic = imgTopic;
    }

    public List<Integer> getTopTopics() {
        return topTopics;
    }

    public void setTopTopics(List<Integer> topTopics) {
        this.topTopics = topTopics;
    }
}
